package com.jy.control.vehicle;

import com.jy.model.M_Vehicle;
import com.jy.service.VehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class VehicleControl {

    private VehicleService vehicleService;


    @Autowired
    public VehicleControl(VehicleService service){
        this.vehicleService = service;
    }

    @RequestMapping("/")
    public String index(){
        return "Demo";
    }

//    @RequestMapping("/vehicle/brandlist")
//    public List<M_Vehicle> List(){
//        List<M_Vehicle> mVehicleList = vehicleService.queryVehicleByName("奥迪");
//        return mVehicleList;
//    }

//    @RequestMapping("/vehicle/brandlist")
//    public List<M_Vehicle> List(){
//        List<M_Vehicle> mVehicleList = service.queryVehicleByName("奥迪");
//        return mVehicleList;
//    }
}
